package com.demo.factory01.easyfactory.factory;

import com.demo.factory01.easyfactory.product.BMW;
import com.demo.factory01.easyfactory.product.BMW320;
import com.demo.factory01.easyfactory.product.BMW523;

public class Factory {
	public BMW createBMW(int type) {
		switch (type) {
		
		case 320:
			return new BMW320();
 
		case 523:
			return new BMW523();
 
		default:
			break;
		}
		return null;
	}
}